home *** CD-ROM | disk | FTP | other *** search
Text File | 2002-10-03 | 38.5 KB | 1,101 lines |
-
-
-
- XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111)))) XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111))))
-
-
-
- NNNNAAAAMMMMEEEE
- XCreateGC, XCopyGC, XChangeGC, XGetGCValues, XFreeGC,
- XGContextFromGC, XGCValues - create or free graphics
- contexts and graphics context structure
-
- SSSSYYYYNNNNTTTTAAAAXXXX
- GC XCreateGC(_d_i_s_p_l_a_y, _d, _v_a_l_u_e_m_a_s_k, _v_a_l_u_e_s)
- Display *_d_i_s_p_l_a_y;
- Drawable _d;
- unsigned long _v_a_l_u_e_m_a_s_k;
- XGCValues *_v_a_l_u_e_s;
-
- XCopyGC(_d_i_s_p_l_a_y, _s_r_c, _v_a_l_u_e_m_a_s_k, _d_e_s_t)
- Display *_d_i_s_p_l_a_y;
- GC _s_r_c, _d_e_s_t;
- unsigned long _v_a_l_u_e_m_a_s_k;
-
- XChangeGC(_d_i_s_p_l_a_y, _g_c, _v_a_l_u_e_m_a_s_k, _v_a_l_u_e_s)
- Display *_d_i_s_p_l_a_y;
- GC _g_c;
- unsigned long _v_a_l_u_e_m_a_s_k;
- XGCValues *_v_a_l_u_e_s;
-
- Status XGetGCValues(_d_i_s_p_l_a_y, _g_c, _v_a_l_u_e_m_a_s_k, _v_a_l_u_e_s__r_e_t_u_r_n)
- Display *_d_i_s_p_l_a_y;
- GC _g_c;
- unsigned long _v_a_l_u_e_m_a_s_k;
- XGCValues *_v_a_l_u_e_s__r_e_t_u_r_n;
-
- XFreeGC(_d_i_s_p_l_a_y, _g_c)
- Display *_d_i_s_p_l_a_y;
- GC _g_c;
-
- GContext XGContextFromGC(_g_c)
- GC _g_c;
-
- AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
- _d Specifies the drawable.
-
- _d_e_s_t Specifies the destination GC.
-
- _d_i_s_p_l_a_y Specifies the connection to the X server.
-
- _g_c Specifies the GC.
-
- _s_r_c Specifies the components of the source GC.
-
- _v_a_l_u_e_m_a_s_k Specifies which components in the GC are to be
- set, copied, changed, or returned . This argument
- is the bitwise inclusive OR of zero or more of the
- valid GC component mask bits.
-
-
-
-
- Page 1 (printed 10/3/02)
-
-
-
-
-
-
- XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111)))) XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111))))
-
-
-
- _v_a_l_u_e_s Specifies any values as specified by the
- valuemask.
-
- _v_a_l_u_e_s__r_e_t_u_r_n
- Returns the GC values in the specified _X_G_C_V_a_l_u_e_s
- structure.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _X_C_r_e_a_t_e_G_C function creates a graphics context and
- returns a GC. The GC can be used with any destination
- drawable having the same root and depth as the specified
- drawable. Use with other drawables results in a _B_a_d_M_a_t_c_h
- error.
-
- _X_C_r_e_a_t_e_G_C can generate _B_a_d_A_l_l_o_c, _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_F_o_n_t,
- _B_a_d_M_a_t_c_h, _B_a_d_P_i_x_m_a_p, and _B_a_d_V_a_l_u_e errors.
-
- The _X_C_o_p_y_G_C function copies the specified components from
- the source GC to the destination GC. The source and
- destination GCs must have the same root and depth, or a
- _B_a_d_M_a_t_c_h error results. The valuemask specifies which
- component to copy, as for _X_C_r_e_a_t_e_G_C.
-
- _X_C_o_p_y_G_C can generate _B_a_d_A_l_l_o_c, _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors.
-
- The _X_C_h_a_n_g_e_G_C function changes the components specified by
- valuemask for the specified GC. The values argument
- contains the values to be set. The values and restrictions
- are the same as for _X_C_r_e_a_t_e_G_C. Changing the clip-mask
- overrides any previous _X_S_e_t_C_l_i_p_R_e_c_t_a_n_g_l_e_s request on the
- context. Changing the dash-offset or dash-list overrides any
- previous _X_S_e_t_D_a_s_h_e_s request on the context. The order in
- which components are verified and altered is server
- dependent. If an error is generated, a subset of the
- components may have been altered.
-
- _X_C_h_a_n_g_e_G_C can generate _B_a_d_A_l_l_o_c, _B_a_d_F_o_n_t, _B_a_d_G_C, _B_a_d_M_a_t_c_h,
- _B_a_d_P_i_x_m_a_p, and _B_a_d_V_a_l_u_e errors.
-
- The _X_G_e_t_G_C_V_a_l_u_e_s function returns the components specified
- by valuemask for the specified GC. If the valuemask
- contains a valid set of GC mask bits (_G_C_F_u_n_c_t_i_o_n,
- _G_C_P_l_a_n_e_M_a_s_k, _G_C_F_o_r_e_g_r_o_u_n_d, _G_C_B_a_c_k_g_r_o_u_n_d, _G_C_L_i_n_e_W_i_d_t_h,
- _G_C_L_i_n_e_S_t_y_l_e, _G_C_C_a_p_S_t_y_l_e, _G_C_J_o_i_n_S_t_y_l_e, _G_C_F_i_l_l_S_t_y_l_e,
- _G_C_F_i_l_l_R_u_l_e, _G_C_T_i_l_e, _G_C_S_t_i_p_p_l_e, _G_C_T_i_l_e_S_t_i_p_X_O_r_i_g_i_n,
- _G_C_T_i_l_e_S_t_i_p_Y_O_r_i_g_i_n, _G_C_F_o_n_t, _G_C_S_u_b_w_i_n_d_o_w_M_o_d_e,
- _G_C_G_r_a_p_h_i_c_s_E_x_p_o_s_u_r_e_s, _G_C_C_l_i_p_X_O_r_i_g_i_n, _G_C_C_L_i_p_Y_O_r_i_g_i_n,
- _G_C_D_a_s_h_O_f_f_s_e_t, or _G_C_A_r_c_M_o_d_e) and no error occurs,
- _X_G_e_t_G_C_V_a_l_u_e_s sets the requested components in values_return
- and returns a nonzero status. Otherwise, it returns a zero
- status. Note that the clip-mask and dash-list (represented
- by the _G_C_C_l_i_p_M_a_s_k and _G_C_D_a_s_h_L_i_s_t bits, respectively, in the
-
-
-
- Page 2 (printed 10/3/02)
-
-
-
-
-
-
- XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111)))) XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111))))
-
-
-
- valuemask) cannot be requested. Also note that an invalid
- resource ID (with one or more of the three most significant
- bits set to 1) will be returned for _G_C_F_o_n_t, _G_C_T_i_l_e, and
- _G_C_S_t_i_p_p_l_e if the component has never been explicitly set by
- the client.
-
- The _X_F_r_e_e_G_C function destroys the specified GC as well as
- all the associated storage.
-
- _X_F_r_e_e_G_C can generate a _B_a_d_G_C error.
-
- SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
- The _X_G_C_V_a_l_u_e_s structure contains:
-
- /* GC attribute value mask bits */
- _G_C_F_u_n_c_t_i_o_n
- (1L<<0)
- #define
- _G_C_P_l_a_n_e_M_a_s_k
- (1L<<1)
- #define
- _G_C_F_o_r_e_g_r_o_u_n_d
- (1L<<2)
- #define
- _G_C_B_a_c_k_g_r_o_u_n_d
- (1L<<3)
- #define
- _G_C_L_i_n_e_W_i_d_t_h
- (1L<<4)
- #define
- _G_C_L_i_n_e_S_t_y_l_e
- (1L<<5)
- #define
- _G_C_C_a_p_S_t_y_l_e
- (1L<<6)
- #define
- _G_C_J_o_i_n_S_t_y_l_e
- (1L<<7)
- #define
- _G_C_F_i_l_l_S_t_y_l_e
- (1L<<8)
- #define
- _G_C_F_i_l_l_R_u_l_e
- (1L<<9)
- #define
- _G_C_T_i_l_e
- (1L<<10)
- #define
- _G_C_S_t_i_p_p_l_e
- (1L<<11)
- #define
- _G_C_T_i_l_e_S_t_i_p_X_O_r_i_g_i_n
- (1L<<12)
- #define
- _G_C_T_i_l_e_S_t_i_p_Y_O_r_i_g_i_n
- (1L<<13)
- #define
- _G_C_F_o_n_t
- (1L<<14)
- #define
- _G_C_S_u_b_w_i_n_d_o_w_M_o_d_e
- (1L<<15)
- #define
- _G_C_G_r_a_p_h_i_c_s_E_x_p_o_s_u_r_e_s
- (1L<<16)
- #define
- _G_C_C_l_i_p_X_O_r_i_g_i_n
- (1L<<17)
- #define
- _G_C_C_l_i_p_Y_O_r_i_g_i_n
- (1L<<18)
- #define
- _G_C_C_l_i_p_M_a_s_k
- (1L<<19)
- #define
- _G_C_D_a_s_h_O_f_f_s_e_t
- (1L<<20)
- #define
- _G_C_D_a_s_h_L_i_s_t
- (1L<<21)
- #define
- _G_C_A_r_c_M_o_d_e
- (1L<<22)
- #define
- /* Values */
-
- typedef struct {
- int function; /* logical operation */
- unsigned long plane_mask;/* plane mask */
- unsigned long foreground;/* foreground pixel */
- unsigned long background;/* background pixel */
- int line_width; /* line width (in pixels) */
- int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
- int cap_style; /* CapNotLast, CapButt, CapRound, CapProjecting */
- int join_style; /* JoinMiter, JoinRound, JoinBevel */
- int fill_style; /* FillSolid, FillTiled, FillStippled FillOpaqueStippled*/
- int fill_rule; /* EvenOddRule, WindingRule */
- int arc_mode; /* ArcChord, ArcPieSlice */
-
-
-
- Page 3 (printed 10/3/02)
-
-
-
-
-
-
- XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111)))) XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC((((3333XXXX11111111))))
-
-
-
- Pixmap tile; /* tile pixmap for tiling operations */
- Pixmap stipple; /* stipple 1 plane pixmap for stippling */
- int ts_x_origin; /* offset for tile or stipple operations */
- int ts_y_origin;
- Font font; /* default text font for text operations */
- int subwindow_mode; /* ClipByChildren, IncludeInferiors */
- Bool graphics_exposures; /* boolean, should exposures be generated */
- int clip_x_origin; /* origin for clipping */
- int clip_y_origin;
- Pixmap clip_mask; /* bitmap clipping; other calls for rects */
- int dash_offset; /* patterned/dashed line information */
- char dashes;
- } XGCValues;
-
- The function attributes of a GC are used when you update a
- section of a drawable (the destination) with bits from
- somewhere else (the source). The function in a GC defines
- how the new destination bits are to be computed from the
- source bits and the old destination bits. _G_X_c_o_p_y is
- typically the most useful because it will work on a color
- display, but special applications may use other functions,
- particularly in concert with particular planes of a color
- display. The 16 GC functions, defined in <_X_1_1/_X._h>, are:
- ______________________________________________
- FFFFuuuunnnnccccttttiiiioooonnnn NNNNaaaammmmeeee VVVVaaaalllluuuueeee OOOOppppeeeerrrraaaattttiiiioooonnnn
- ______________________________________________
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 4 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- _G_X_c_l_e_a_r
- 0x0
- 0
- _G_X_a_n_d
- 0x1
- src AND dst
- _G_X_a_n_d_R_e_v_e_r_s_e
- 0x2
- src AND NOT dst
- _G_X_c_o_p_y
- 0x3
- src
- _G_X_a_n_d_I_n_v_e_r_t_e_d
- 0x4
- (NOT src) AND dst
- _G_X_n_o_o_p
- 0x5
- dst
- _G_X_x_o_r
- 0x6
- src XOR dst
- _G_X_o_r
- 0x7
- src OR dst
- _G_X_n_o_r
- 0x8
- (NOT src) AND (NOT
- dst)
-
- _G_X_e_q_u_i_v
- 0x9
- (NOT src) XOR dst
- _G_X_i_n_v_e_r_t
- 0xa
- NOT dst
- _G_X_o_r_R_e_v_e_r_s_e
- 0xb
- src OR (NOT dst)
- _G_X_c_o_p_y_I_n_v_e_r_t_e_d
- 0xc
- NOT src
- _G_X_o_r_I_n_v_e_r_t_e_d
- 0xd
- (NOT src) OR dst
- _G_X_n_a_n_d
- 0xe
- (NOT src) OR (NOT
- dst)
-
- _G_X_s_e_t
- 0xf
- 1
- ______________________________________________
-
- Many graphics operations depend on either pixel values or
- planes in a GC. The planes attribute is of type long, and
- it specifies which planes of the destination are to be
- modified, one bit per plane. A monochrome display has only
- one plane and will be the least significant bit of the word.
- As planes are added to the display hardware, they will
- occupy more significant bits in the plane mask.
-
- In graphics operations, given a source and destination
- pixel, the result is computed bitwise on corresponding bits
- of the pixels. That is, a Boolean operation is performed in
- each bit plane. The plane_mask restricts the operation to a
- subset of planes. A macro constant _A_l_l_P_l_a_n_e_s can be used to
- refer to all planes of the screen simultaneously. The
- result is computed by the following:
-
- ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask))
-
- Range checking is not performed on the values for
- foreground, background, or plane_mask. They are simply
- truncated to the appropriate number of bits. The line-width
- is measured in pixels and either can be greater than or
- equal to one (wide line) or can be the special value zero
- (thin line).
-
- Wide lines are drawn centered on the path described by the
- graphics request. Unless otherwise specified by the join-
- style or cap-style, the bounding box of a wide line with
- endpoints [x1, y1], [x2, y2] and width w is a rectangle with
- vertices at the following real coordinates:
-
- [x1-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1-(w*cs/2)],
-
-
-
- Page 1 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- [x2-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2-(w*cs/2)]
-
- Here sn is the sine of the angle of the line, and cs is the
- cosine of the angle of the line. A pixel is part of the
- line and so is drawn if the center of the pixel is fully
- inside the bounding box (which is viewed as having
- infinitely thin edges). If the center of the pixel is
- exactly on the bounding box, it is part of the line if and
- only if the interior is immediately to its right (x
- increasing direction). Pixels with centers on a horizontal
- edge are a special case and are part of the line if and only
- if the interior or the boundary is immediately below (y
- increasing direction) and the interior or the boundary is
- immediately to the right (x increasing direction).
-
- Thin lines (zero line-width) are one-pixel-wide lines drawn
- using an unspecified, device-dependent algorithm. There are
- only two constraints on this algorithm.
-
- 1. If a line is drawn unclipped from [x1,y1] to [x2,y2]
- and if another line is drawn unclipped from
- [x1+dx,y1+dy] to [x2+dx,y2+dy], a point [x,y] is
- touched by drawing the first line if and only if the
- point [x+dx,y+dy] is touched by drawing the second
- line.
-
- 2. The effective set of points comprising a line cannot be
- affected by clipping. That is, a point is touched in a
- clipped line if and only if the point lies inside the
- clipping region and the point would be touched by the
- line when drawn unclipped.
-
- A wide line drawn from [x1,y1] to [x2,y2] always draws the
- same pixels as a wide line drawn from [x2,y2] to [x1,y1],
- not counting cap-style and join-style. It is recommended
- that this property be true for thin lines, but this is not
- required. A line-width of zero may differ from a line-width
- of one in which pixels are drawn. This permits the use of
- many manufacturers' line drawing hardware, which may run
- many times faster than the more precisely specified wide
- lines.
-
- In general, drawing a thin line will be faster than drawing
- a wide line of width one. However, because of their
- different drawing algorithms, thin lines may not mix well
- aesthetically with wide lines. If it is desirable to obtain
- precise and uniform results across all displays, a client
- should always use a line-width of one rather than a line-
- width of zero.
-
- The line-style defines which sections of a line are drawn:
- _L_i_n_e_S_o_l_i_d
-
-
-
- Page 2 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- The full path of the line is drawn.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 4 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- _L_i_n_e_D_o_u_b_l_e_D_a_s_h
- The full path of the line is drawn, but the
- even dashes are filled differently from the
- odd dashes (see fill-style) with _C_a_p_B_u_t_t
- style used where even and odd dashes meet.
-
-
-
- _L_i_n_e_O_n_O_f_f_D_a_s_h
- Only the even dashes are drawn, and cap-style
- applies to all internal ends of the
- individual dashes, except _C_a_p_N_o_t_L_a_s_t is
- treated as _C_a_p_B_u_t_t.
-
-
-
-
- The cap-style defines how the endpoints of a path are drawn:
- _C_a_p_N_o_t_L_a_s_t
- This is equivalent to _C_a_p_B_u_t_t except that for
- a line-width of zero the final endpoint is
- not drawn.
-
-
- _C_a_p_B_u_t_t
- The line is square at the endpoint
- (perpendicular to the slope of the line) with
- no projection beyond.
-
-
- _C_a_p_R_o_u_n_d
- The line has a circular arc with the diameter
- equal to the line-width, centered on the
- endpoint. (This is equivalent to _C_a_p_B_u_t_t for
- line-width of zero).
-
-
-
- _C_a_p_P_r_o_j_e_c_t_i_n_g
- The line is square at the end, but the path
- continues beyond the endpoint for a distance
- equal to half the line-width. (This is
- equivalent to _C_a_p_B_u_t_t for line-width of
- zero).
-
-
-
-
-
- The join-style defines how corners are drawn for wide lines:
- _J_o_i_n_M_i_t_e_r
- The outer edges of two lines extend to meet
- at an angle. However, if the angle is less
- than 11 degrees, then a _J_o_i_n_B_e_v_e_l join-style
- is used instead.
-
-
-
- _J_o_i_n_R_o_u_n_d
- The corner is a circular arc with the
- diameter equal to the line-width, centered on
- the joinpoint.
-
-
- _J_o_i_n_B_e_v_e_l
- The corner has _C_a_p_B_u_t_t endpoint styles with
- the triangular notch filled.
-
-
- For a line with coincident endpoints (x1=x2, y1=y2), when
- the cap-style is applied to both endpoints, the semantics
- depends on the line-width and the cap-style:
- _C_a_p_N_o_t_L_a_s_t
- thin
- The results are device dependent, but
- the desired effect is that nothing is
- drawn.
-
-
- _C_a_p_B_u_t_t
- thin
- The results are device dependent, but
- the desired effect is that a single
- pixel is drawn.
-
-
-
-
-
-
- Page 5 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- _C_a_p_R_o_u_n_d
- thin
- The results are the same as for
- _C_a_p_B_u_t_t/thin.
-
- _C_a_p_P_r_o_j_e_c_t_i_n_g
- thin
- The results are the same as for
- _C_a_p_B_u_t_t/thin.
-
- _C_a_p_B_u_t_t
- wide
- Nothing is drawn.
- _C_a_p_R_o_u_n_d
- wide
- The closed path is a circle, centered at
- the endpoint, and with the diameter
- equal to the line-width.
-
-
- _C_a_p_P_r_o_j_e_c_t_i_n_g
- wide
- The closed path is a square, aligned
- with the coordinate axes, centered at
- the endpoint, and with the sides equal
- to the line-width.
-
-
-
-
- For a line with coincident endpoints (x1=x2, y1=y2), when
- the join-style is applied at one or both endpoints, the
- effect is as if the line was removed from the overall path.
- However, if the total path consists of or is reduced to a
- single point joined with itself, the effect is the same as
- when the cap-style is applied at both endpoints.
-
- The tile/stipple represents an infinite two-dimensional
- plane, with the tile/stipple replicated in all dimensions.
- When that plane is superimposed on the drawable for use in a
- graphics operation, the upper-left corner of some instance
- of the tile/stipple is at the coordinates within the
- drawable specified by the tile/stipple origin. The
- tile/stipple and clip origins are interpreted relative to
- the origin of whatever destination drawable is specified in
- a graphics request. The tile pixmap must have the same root
- and depth as the GC, or a _B_a_d_M_a_t_c_h error results. The
- stipple pixmap must have depth one and must have the same
- root as the GC, or a _B_a_d_M_a_t_c_h error results. For stipple
- operations where the fill-style is _F_i_l_l_S_t_i_p_p_l_e_d but not
- _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d, the stipple pattern is tiled in a single
- plane and acts as an additional clip mask to be ANDed with
- the clip-mask. Although some sizes may be faster to use
- than others, any size pixmap can be used for tiling or
- stippling.
-
- The fill-style defines the contents of the source for line,
- text, and fill requests. For all text and fill requests (for
- example, _X_D_r_a_w_T_e_x_t, _X_D_r_a_w_T_e_x_t_1_6, _X_F_i_l_l_R_e_c_t_a_n_g_l_e,
- _X_F_i_l_l_P_o_l_y_g_o_n, and _X_F_i_l_l_A_r_c); for line requests with line-
- style _L_i_n_e_S_o_l_i_d (for example, _X_D_r_a_w_L_i_n_e, _X_D_r_a_w_S_e_g_m_e_n_t_s,
- _X_D_r_a_w_R_e_c_t_a_n_g_l_e, _X_D_r_a_w_A_r_c); and for the even dashes for line
- requests with line-style _L_i_n_e_O_n_O_f_f_D_a_s_h or _L_i_n_e_D_o_u_b_l_e_D_a_s_h,
- the following apply:
- _F_i_l_l_S_o_l_i_d
-
-
-
-
-
- Page 6 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- Foreground
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 7 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- _F_i_l_l_T_i_l_e_d
- Tile
- _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d
- A tile with the same width and height as
- stipple, but with background everywhere
- stipple has a zero and with foreground
- everywhere stipple has a one
-
-
-
- _F_i_l_l_S_t_i_p_p_l_e_d
- Foreground masked by stipple
-
- When drawing lines with line-style _L_i_n_e_D_o_u_b_l_e_D_a_s_h, the odd
- dashes are controlled by the fill-style in the following
- manner:
- _F_i_l_l_S_o_l_i_d
- Background
- _F_i_l_l_T_i_l_e_d
- Same as for even dashes
- _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d
- Same as for even dashes
- _F_i_l_l_S_t_i_p_p_l_e_d
- Background masked by stipple
-
- Storing a pixmap in a GC might or might not result in a copy
- being made. If the pixmap is later used as the destination
- for a graphics request, the change might or might not be
- reflected in the GC. If the pixmap is used simultaneously
- in a graphics request both as a destination and as a tile or
- stipple, the results are undefined.
-
- For optimum performance, you should draw as much as possible
- with the same GC (without changing its components). The
- costs of changing GC components relative to using different
- GCs depend on the display hardware and the server
- implementation. It is quite likely that some amount of GC
- information will be cached in display hardware and that such
- hardware can only cache a small number of GCs.
-
- The dashes value is actually a simplified form of the more
- general patterns that can be set with _X_S_e_t_D_a_s_h_e_s.
- Specifying a value of N is equivalent to specifying the
- two-element list [N, N] in _X_S_e_t_D_a_s_h_e_s. The value must be
- nonzero, or a _B_a_d_V_a_l_u_e error results.
-
- The clip-mask restricts writes to the destination drawable.
- If the clip-mask is set to a pixmap, it must have depth one
- and have the same root as the GC, or a _B_a_d_M_a_t_c_h error
- results. If clip-mask is set to _N_o_n_e, the pixels are always
- drawn regardless of the clip origin. The clip-mask also can
- be set by calling the _X_S_e_t_C_l_i_p_R_e_c_t_a_n_g_l_e_s or _X_S_e_t_R_e_g_i_o_n
- functions. Only pixels where the clip-mask has a bit set to
- 1 are drawn. Pixels are not drawn outside the area covered
- by the clip-mask or where the clip-mask has a bit set to 0.
- The clip-mask affects all graphics requests. The clip-mask
- does not clip sources. The clip-mask origin is interpreted
- relative to the origin of whatever destination drawable is
- specified in a graphics request.
-
-
- Page 8 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- You can set the subwindow-mode to _C_l_i_p_B_y_C_h_i_l_d_r_e_n or
- _I_n_c_l_u_d_e_I_n_f_e_r_i_o_r_s. For _C_l_i_p_B_y_C_h_i_l_d_r_e_n, both source and
- destination windows are additionally clipped by all viewable
- _I_n_p_u_t_O_u_t_p_u_t children. For _I_n_c_l_u_d_e_I_n_f_e_r_i_o_r_s, neither source
- nor destination window is clipped by inferiors. This will
- result in including subwindow contents in the source and
- drawing through subwindow boundaries of the destination.
- The use of _I_n_c_l_u_d_e_I_n_f_e_r_i_o_r_s on a window of one depth with
- mapped inferiors of differing depth is not illegal, but the
- semantics are undefined by the core protocol.
-
- The fill-rule defines what pixels are inside (drawn) for
- paths given in _X_F_i_l_l_P_o_l_y_g_o_n requests and can be set to
- _E_v_e_n_O_d_d_R_u_l_e or _W_i_n_d_i_n_g_R_u_l_e. For _E_v_e_n_O_d_d_R_u_l_e, a point is
- inside if an infinite ray with the point as origin crosses
- the path an odd number of times. For _W_i_n_d_i_n_g_R_u_l_e, a point is
- inside if an infinite ray with the point as origin crosses
- an unequal number of clockwise and counterclockwise directed
- path segments. A clockwise directed path segment is one
- that crosses the ray from left to right as observed from the
- point. A counterclockwise segment is one that crosses the
- ray from right to left as observed from the point. The case
- where a directed line segment is coincident with the ray is
- uninteresting because you can simply choose a different ray
- that is not coincident with a segment.
-
- For both _E_v_e_n_O_d_d_R_u_l_e and _W_i_n_d_i_n_g_R_u_l_e, a point is infinitely
- small, and the path is an infinitely thin line. A pixel is
- inside if the center point of the pixel is inside and the
- center point is not on the boundary. If the center point is
- on the boundary, the pixel is inside if and only if the
- polygon interior is immediately to its right (x increasing
- direction). Pixels with centers on a horizontal edge are a
- special case and are inside if and only if the polygon
- interior is immediately below (y increasing direction).
-
- The arc-mode controls filling in the _X_F_i_l_l_A_r_c_s function and
- can be set to _A_r_c_P_i_e_S_l_i_c_e or _A_r_c_C_h_o_r_d. For _A_r_c_P_i_e_S_l_i_c_e, the
- arcs are pie-slice filled. For _A_r_c_C_h_o_r_d, the arcs are chord
- filled.
-
- The graphics-exposure flag controls _G_r_a_p_h_i_c_s_E_x_p_o_s_e event
- generation for _X_C_o_p_y_A_r_e_a and _X_C_o_p_y_P_l_a_n_e requests (and any
- similar requests defined by extensions).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _B_a_d_A_l_l_o_c The server failed to allocate the requested
- resource or server memory.
-
- _B_a_d_D_r_a_w_a_b_l_e
- A value for a Drawable argument does not name a
- defined Window or Pixmap.
-
-
-
- Page 9 (printed 10/3/02)
-
-
-
-
-
-
- (((()))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV (((())))
-
-
-
- _B_a_d_F_o_n_t A value for a Font or GContext argument does not
- name a defined Font.
-
- _B_a_d_G_C A value for a GContext argument does not name a
- defined GContext.
-
- _B_a_d_M_a_t_c_h An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
-
- _B_a_d_M_a_t_c_h Some argument or pair of arguments has the correct
- type and range but fails to match in some other
- way required by the request.
-
- _B_a_d_P_i_x_m_a_p A value for a Pixmap argument does not name a
- defined Pixmap.
-
- _B_a_d_V_a_l_u_e Some numeric value falls outside the range of
- values accepted by the request. Unless a specific
- range is specified for an argument, the full range
- defined by the argument's type is accepted. Any
- argument defined as a set of alternatives can
- generate this error.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- AllPlanes(3X11), XCopyArea(3X11), XCreateRegion(3X11),
- XDrawArc(3X11), XDrawLine(3X11), XDrawRectangle(3X11),
- XDrawText(3X11), XFillRectangle(3X11), XQueryBestSize(3X11),
- XSetArcMode(3X11), XSetClipOrigin(3X11),
- XSetFillStyle(3X11), XSetFont(3X11),
- XSetLineAttributes(3X11), XSetState(3X11), XSetTile(3X11)
- _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 10 (printed 10/3/02)
-
-
-
-